fdd4673466ec4861319cff30b96af15b55837ec6,Android/LuaViewSDK/src/com/taobao/luaview/util/ImageUtil.java,ImageUtil,adjustSize,#ImageView#,35

Before Change


     */
    public static void adjustSize(ImageView imageView) {
        if (imageView != null && imageView.getLayoutParams() != null && imageView.getDrawable() != null) {
            imageView.getLayoutParams().width = (imageView.getDrawable()).getIntrinsicWidth();
            imageView.getLayoutParams().height = (imageView.getDrawable()).getIntrinsicHeight();
        }
    }

After Change


     */
    public static void adjustSize(ImageView imageView) {
        if (imageView != null && imageView.getLayoutParams() != null && imageView.getDrawable() != null) {
            final int width = (imageView.getDrawable()).getIntrinsicWidth();
            final int height = (imageView.getDrawable()).getIntrinsicHeight();
            if (width != imageView.getLayoutParams().width || height != imageView.getLayoutParams().height) {
                imageView.getLayoutParams().width = width;
                imageView.getLayoutParams().height = height;
                imageView.requestLayout();
            }
        }
    }